[mysql]
no-auto-rehash
prompt      =mysql(master)>\ \
[mysqld]
# DO NOT MODIFY, Universe will generate this part
port = 3306
server_id = server_id_num
basedir = /opt/mysql/base
datadir = /opt/mysql/data/3306
log_bin = /opt/mysql/binlog/3306/mysql-bin
tmpdir = /opt/mysql/tmp/3306
socket = /opt/mysql/data/3306/mysqld.sock
log_error = mysql-error.log

# BINLOG
binlog_error_action = ABORT_SERVER
binlog_format = row
binlog_rows_query_log_events = 1
log_slave_updates = 1
master_info_repository = TABLE
max_binlog_size = 250M
relay_log = mysql-relay-bin
relay_log_info_repository = TABLE
relay_log_recovery = 1
sync_binlog = 1
sync_relay_log = 1

# GTID #
gtid_mode = ON
enforce_gtid_consistency = 1

# ENGINE
default_storage_engine = InnoDB
innodb_buffer_pool_size = innodb_buffer_var
innodb_data_file_path = ibdata1:1G:autoextend
innodb_file_per_table = 1
innodb_flush_log_at_trx_commit=1
innodb_flush_method = O_DIRECT
innodb_io_capacity = 200
innodb_log_buffer_size = 64M
innodb_log_file_size = 256M
innodb_log_files_in_group = 2
innodb_max_dirty_pages_pct = 60
innodb_print_all_deadlocks=1
innodb_stats_on_metadata = 0
innodb_strict_mode = 1

# CACHE
key_buffer_size = 32M
tmp_table_size = 32M
max_heap_table_size = 32M
table_open_cache = 1024
query_cache_type = 0
query_cache_size = 0
max_connections = 1000
thread_cache_size = 1024
open_files_limit = 65535

# SLOW LOG
slow_query_log = 1
slow_query_log_file = mysql-slow.log
log_slow_admin_statements = 1
log_slow_slave_statements = 1
long_query_time  = 1

# SEMISYNC #
plugin_load = "rpl_semi_sync_master=semisync_master.so;rpl_semi_sync_slave=semisync_slave.so"
rpl_semi_sync_master_enabled = 1
rpl_semi_sync_slave_enabled = 1
rpl_semi_sync_master_wait_for_slave_count = 0
rpl_semi_sync_master_wait_no_slave = 1
rpl_semi_sync_master_timeout = 10000

# CLIENT_DEPRECATE_EOF
session_track_schema = 1
session_track_state_change = 1
session_track_system_variables = '*'

# MISC
character_set_server = utf8
log_timestamps=SYSTEM        
lower_case_table_names = 1
max_allowed_packet = 32M
read_only = 0
skip_external_locking = 1
skip_name_resolve = 1
skip_slave_start = 1
pid_file = mysqld.pid
#disabled_storage_engines = ARCHIVE,BLACKHOLE,CSV,EXAMPLE,FEDERATED,MEMORY,MERGE,MyISAM,NDB
